> */ public function getNodeTypes() : array { return [FuncCall::class]; } /** * @param FuncCall $node */ public function refactor(Node $node) : ?Node { if ($node->isFirstClassCallable()) { return null; } if (\count($node->getArgs()) !== 0) { return null; } $target = null; if ($this->isName($node, 'get_class')) { $target = 'self'; } if ($this->isName($node, 'get_parent_class')) { $target = 'parent'; } if ($target !== null) { return new ClassConstFetch(new Name([$target]), new VarLikeIdentifier('class')); } return null; } public function provideMinPhpVersion() : int { return PhpVersionFeature::DEPRECATE_GET_CLASS_WITHOUT_ARGS; } }